package com.stylefeng.guns.modular.customer.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.stylefeng.guns.modular.customer.service.IVisitPicService;
import com.stylefeng.guns.modular.system.dao.VisitPicMapper;
import com.stylefeng.guns.modular.system.model.VisitPic;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 拜访记录 服务实现类
 * </p>
 *
 * @author yinjc123
 * @since 2018-04-14
 */
@Service
public class VisitPicServiceImpl extends ServiceImpl<VisitPicMapper, VisitPic> implements IVisitPicService {

    @Override
    public void deleteByVisitId(Integer visitId) {
        EntityWrapper<VisitPic> ew = new EntityWrapper<VisitPic>();
        ew.eq("visit_id", visitId);
        delete(ew);
    }

    @Override
    public List<VisitPic> selectByVisitId(Integer visitId) {
        EntityWrapper<VisitPic> ew = new EntityWrapper<VisitPic>();
        ew.eq("visit_id", visitId);
        return selectList(ew);
    }
}
